package divinity.basic
{
	import flash.utils.Dictionary;
	public class Faction
	{
		private var _name:String;
		private var _members:Dictionary;
		private var _memNumber:int=0;
		private static var fc:int=0;
		public function Faction(fname:String=null)
		{
			if(fname==null)
			{
				_name="new faction "+fc;
				fc++;
			}
			else
			{
				_name=fname;	
			}
			_members=[];
		}
		public function addMember(mem:*):int
		{
			var ret:int=_memNumber;
			_members[mem]=_memNumber;
			_memNumber++;
			return ret;		
		}		 
		public function get name():String
		{
			return _name;
		}
		public function get members():Array
		{
			return _memebrs;
		}
	}
}